<?php
	class RotationModel extends Model{
		public $_validate =	array(
				array('state',array(1,2),'请确保是否轮播类型合法!',Model::MUST_VALIDATE,'in'),
				array('link','require','链接必须填写！'),
				array('title','0,20','标题不得大于20位',Model::VALUE_VAILIDATE,'length'),
				array('info','0,200','内容简介不得大于20位',Model::VALUE_VAILIDATE,'length'),
				array('weburl','url','网站地址格式不正确!'),
		);
		
		public $_auto =	array(
				array('date','time',self::MODEL_INSERT,'function'),
				array('state','getState',Model:: MODEL_INSERT,'callback'),
		);
		
		//自动填充审核状态state未0，未审核
		public function getState(){
			return 0;
		}
	}
?>